Skip to main content
Use these test fixtures to simulate successful payments, declines, and errors through the Partner Payments API. The tables list the input to send and the response to expect.
These values require a sandbox portal configured for the simulated payment scenarios. Request an API key and a suitable portalId through Sandbox access. Use the sandbox at https://apistagepc.grogov.us. Do not use these fixtures for live payments or send real card details to the sandbox.

Common request data

Start with these values for POST /api/partner/v1/payments. Change the input identified in a scenario table and keep the rest of the request valid. For an idempotency test, reuse the key as directed in Request and retry scenarios. Changing only the card number while reusing a key returns 409 IDEMPOTENCY_MISMATCH instead of the card’s result. Repeated declines can trigger 409 DECLINE_BLOCKED or 429 VELOCITY_LIMIT before the card scenario runs. Use a fresh payment-level referenceId for independent tests.

Test card numbers

Set paymentMethod.type to "card" and use one of these values for paymentMethod.cardNumber. All numbers below are sandbox fixtures. Unless stated otherwise, use the common request data above. The card number selects the simulated decline reason. Keep a future expiration date and cvv: "123", including for the expired-card and security-code-mismatch scenarios. An expired date or malformed security code in the request causes 400 VALIDATION_ERROR before the card scenario runs. For errors, read the HTTP status and details.code. Several decline scenarios share PAYMENT_DECLINED; do not use the human-readable message as a stable identifier.
504 PAYMENT_TIMEOUT means the charge outcome is unknown. Use 4200400000000077 to test this response. Check the payment before attempting another charge. If you sent an Idempotency-Key, retrying with that key returns 409 IDEMPOTENCY_RECONCILIATION_REQUIRED. See Errors and Idempotency.

Card payment example

Replace the credential and portal placeholders. Generate a new payment reference and idempotency key for each independent test. To test another outcome, change cardNumber using the table above.
cURL

Test card tokens

Replace the entire paymentMethod object with { "type": "card_token", "token": "<test-card-token>" }. Use one of the literal tokens below. You do not need to create these sandbox tokens or provide a card number, expiration date, or security code. For example, use this object with the other fields from the card payment example:
These are reusable sandbox fixtures, not production payment credentials. A card token represents card details and is separate from the access token used to authenticate API requests. Send your API key or access token in the Authorization header as usual.

Request and retry scenarios

Use the approved card and common request data unless a row specifies another input. Change one condition at a time.

Refund and void scenarios

Create a separate successful payment for each scenario below. Use its returned id in the request path. Amounts below assume the original principal was 5000 cents. The paths in this table use the /api/partner/v1 prefix. Use a new idempotency key for each distinct operation. Reuse the key only when retrying that operation.

Other errors

See Errors for guidance on handling these responses. Storing cards and charging stored cards are not supported. POST /vault and paymentMethod.type: "vault" return 501 VAULT_NOT_SUPPORTED.

Worked scenarios

Run complete cURL examples for payments, refunds, and error responses.