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 forPOST /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
SetpaymentMethod.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.
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, changecardNumber using the table above.
cURL
Test card tokens
Replace the entirepaymentMethod 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:
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 returnedid 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.