pg_card_token.pg_user_id: pass the token with the same pg_user_id in later requests instead of card details.pg_payment_method), or by pg_card_token.pg_recurring_start = 1, a recurring profile is created: use pg_recurring_profile in Pay by recurring profile.pg_3ds = 1 is returned, the client completes 3DS, then call Save card: complete 3DS: the token is returned there.pg_status | pg_3ds | Meaning | Next step |
|---|---|---|---|
ok | 0 | The card is saved. With pg_recurring_start = 1, the recurring profile is created. | Store pg_card_token and pg_recurring_profile. |
ok | 1 | 3DS is required. | Open pg_3d_acsurl for the client, then call Save card: complete 3DS. |
error | — | The request is rejected. | See «Errors» below. |
200; the error is returned in pg_error_code and pg_error_description.pg_error_code | When | What to do |
|---|---|---|
94031 | A field is not passed or has an invalid value, for example pg_card_cvc or pg_online_payment_cryptogram, or pg_card_token is not found. | Fix the request. |
1100 | The signature is missing or invalid, or pg_merchant_id is not found. If the merchant is not found, the response is not signed. | Check the merchant ID and the signature with the secret key. |
10000 | pg_recurring_lifetime exceeds the card expiry, or the card cannot be saved. | If pg_recurring_lifetime exceeds the card expiry, reduce it. Otherwise repeat the request later. |
| Other codes | The payment system declined the card. | See Error codes. |
pg_sig is calculated with the secret key test_secret_key.