Wallet Decryption
The Create Card allows clients to register a digital wallet credential in the Credential Management Platform (CMP) using an encrypted wallet payment token. Supported wallet types include Apple Pay.
The request accepts the encrypted wallet payload, which is securely decrypted by VGS to extract the underlying credential details and create a card linked to a specific account. Each request results in the creation of a new card and returns a 201 response with a new Card ID, even if the same DPAN or MPAN is submitted multiple times. Duplicate detection and deduplication logic are not supported for this card type.
The payment_method object (display_name, network, type) is optional in the request. If these fields are provided, their values will be echoed back in the response. If they are not included in the request, they will not be returned.
Card created
The request was invalid.
No credentials were provided, or the provided credentials were expired.
Valid credentials were provided, but they do not permit access to this resource.
The server was unable to process the request because it contains invalid data.
Internal Server Error
Service Unavailable
POST /cards HTTP/1.1
Host: sandbox.vgsapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 394
{
"data": {
"attributes": {
"encrypted_payment_data": {
"encrypted_payload_text": "mF39zG56jLXgoWXyL64ATxyhKQNw5terOPcpjC3u8...truncated...cxjg23OMYBhY1ON9bEoGKWB0MGtAvtZrRxMYiD2GKiPLbTHNAs4q7T4ahQ==",
"key_hash": "4VEn0bzlhTscArIT3Gvbq2MKiZlHAlZc76kAUxSD18w=",
"public_key": "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEeWDI9W1SH0TLRg+X+7z7iPHE4BFp6J8xenFoUzdJczOoQxVuE4d3z0urfDsRF1M85EKi/GyLD7bt0/4+Vh+ZAA=="
}
}
}
}{
"data": {
"id": "CRDkd89ey1yqSDkSAzPngSnLF",
"type": "cards",
"attributes": {
"enrollment_source": "frontbook",
"pan": "4111111111111111",
"cvc_status": "not-set",
"exp_month": 11,
"exp_year": 26,
"token_type": "mpan",
"wallet_type": "apple_pay",
"pan_alias": "tok_sandbox_hhyPgvvdFfFGBnyi73TfFu",
"bin": "411111",
"first8": "41111111",
"last4": "1111",
"card_fingerprint": "6TeSCB16LtyifEAmY2goxYfSk5sALriXpefzzxh29xhu",
"created_at": "2025-08-01T00:00:00Z",
"updated_at": "2025-08-01T00:00:00Z",
"card_brand": "VISA",
"card_type": "CREDIT",
"wallet_details": {
"currency_code": "USD",
"amount": 2500,
"device_manufacturer_identifier": "040010030273",
"payment_data_type": "MerchantToken",
"merchant_token_identifier": "DNITHE302308980001844",
"payment_method": {
"display_name": "Visa 0121",
"network": "Visa",
"type": "credit"
},
"transaction_id": "9a0650018c263c03fb34618407fb00a302"
}
}
},
"metadata": {
"observability": {
"trace_id": "2d137f00cc53f5a9265f3b40402f7892",
"client_id": "ACHwLNAA4-jc_testvault-sY8MF",
"vault_id": "tnt9hg3iiwy",
"account_id": "ACTrKr34UF7YyvbVPwcWqXHWn",
"fingerprint": "KCxZx3kkeXF9xnJvyzJHRwx5ycyrDNgzAXk8K15E5BpyuHmpTR5qfBRgzAvrzurFdtM"
}
}
}The Get API allows clients to retrieve details for a specific digital wallet credential using its unique cardID.
The response returns the stored card attributes derived from the decrypted wallet payload, including last four digits, expiration details, and any request-level attributes persisted at creation (such as payment_method, if provided). If payment_method fields were included during creation, they will be returned in the response. If not provided, they will not be present.
cryptogram, currencyCode, transactionId, and amount are not returned in the GET response, as these are single-use wallet artifacts and are not persisted.
Item requested by ID
No credentials were provided, or the provided credentials were expired.
Valid credentials were provided, but they do not permit access to this resource.
Resource not found.
Internal Server Error
Service Unavailable
GET /cards/{card_id} HTTP/1.1
Host: sandbox.vgsapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": {
"id": "CRDkd89ey1yqSDkSAzPngSnLF",
"type": "cards",
"attributes": {
"enrollment_source": "frontbook",
"pan": "4111111111111111",
"cvc_status": "not-set",
"exp_month": 11,
"exp_year": 26,
"token_type": "mpan",
"wallet_type": "apple_pay",
"pan_alias": "tok_sandbox_hhyPgvvdFfFGBnyi73TfFu",
"bin": "411111",
"first8": "41111111",
"last4": "1111",
"card_fingerprint": "6TeSCB16LtyifEAmY2goxYfSk5sALriXpefzzxh29xhu",
"created_at": "2025-08-01T00:00:00Z",
"updated_at": "2025-08-01T00:00:00Z",
"card_brand": "VISA",
"card_type": "CREDIT",
"wallet_details": {
"device_manufacturer_identifier": "040010030273",
"payment_data_type": "MerchantToken",
"merchant_token_identifier": "DNITHE302308980001844",
"payment_method": {
"display_name": "Visa 0121",
"network": "Visa",
"type": "credit"
}
}
}
},
"metadata": {
"observability": {
"trace_id": "2d137f00cc53f5a9265f3b40402f7892",
"client_id": "ACHwLNAA4-jc_testvault-sY8MF",
"vault_id": "tnt9hg3iiwy",
"account_id": "ACTrKr34UF7YyvbVPwcWqXHWn",
"fingerprint": "KCxZx3kkeXF9xnJvyzJHRwx5ycyrDNgzAXk8K15E5BpyuHmpTR5qfBRgzAvrzurFdtM"
}
}
}Last updated

