Before you start
- A Reap API key for the sandbox or production environment
- Agentic Payments enabled on your project
- An HTTPS return URL that receives the user after the hosted card entry page and the hosted approval page
Authorization header and a Reap-Version header. The examples below use the sandbox host. Switch to the production host when you go live.
Store a card
1
Create the enrollment
Pick the source that matches the card you are storing.
POST /agentic/enrollments requires an Idempotency-Key. A retry with the same key replays the first response instead of storing the card twice.- Reap card
- BIN sponsor card
- External card
Use this source for a card Reap already issued.The
Request
Response
owner block names the cardholder that Reap resolved from the card.2
Send the user to the hosted card entry page
This step applies to all sources. Redirect the user to
nextAction.url before expiresAt passes, and the user enters the card on a page hosted by Reap. Card details never reach your servers.Reap sends the user back to the returnUrl you supplied. Returning to that URL means the hosted page is finished. It does not mean the card is stored, so confirm the status next.3
Confirm the enrollment is ACTIVE
Read the enrollment with A status of
GET /agentic/enrollments/:id after any hosted step.Request
Response
ACTIVE means the card is ready to charge. A status of REQUIRES_ACTION means a hosted step is still outstanding, and nextAction tells you where to send the user. The paymentMethod block gives you the network and the last four digits to display in your own interface.Present the available enrollment cards to the user
List the enrollments of one owner withGET /agentic/enrollments and show each stored card so the user can pick one. The paymentMethod block carries the network, the last four digits, and the expiry to display. Scope every list call to a single owner.
Request
Response
nextCursor when it holds a value. A null cursor means the last page.
Test cards
Use these test cards on the hosted card entry page to run the full payment flow in the sandbox. They behave like real cards but never move money. Reap adds more cards and networks as it supports them.These cards only work through the Agentic Payments API and are declined everywhere else.
One-time passwords
The card verification step may ask for a one-time password. Enter456789. The same code works whether you choose email or SMS delivery.
Next steps
One-Time Purchases
Run a single purchase against the enrollment you created.
Lifecycle and Statuses
Revoke a stored card and read every status value.