curl --request POST \
--url https://sg.sandbox.api.reap.global/agentic/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"source": "REAP_CARD",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({source: 'REAP_CARD', cardId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://sg.sandbox.api.reap.global/agentic/enrollments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/agentic/enrollments"
payload = {
"source": "REAP_CARD",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Reap-Version": "<reap-version>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"status": "REQUIRES_ACTION",
"source": "REAP_CARD",
"owner": {
"type": "REAP_USER",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "AGENTIC_REQUEST_REJECTED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_PAYMENTS_NOT_ENABLED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_RESOURCE_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_SERVICE_UNAVAILABLE",
"message": "<string>",
"detail": {}
}
}Create enrollment
Stores a card for later agentic purchases. An existing card is enrolled directly and is ACTIVE at once; an EXTERNAL source returns a redirect to a hosted card-entry page and becomes ACTIVE once the customer submits their card. Pass the enrollment id to POST /agentic/checkouts to charge it.
curl --request POST \
--url https://sg.sandbox.api.reap.global/agentic/enrollments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'Reap-Version: <reap-version>' \
--data '
{
"source": "REAP_CARD",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {
'Reap-Version': '<reap-version>',
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({source: 'REAP_CARD', cardId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://sg.sandbox.api.reap.global/agentic/enrollments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sg.sandbox.api.reap.global/agentic/enrollments"
payload = {
"source": "REAP_CARD",
"cardId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Reap-Version": "<reap-version>",
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"status": "REQUIRES_ACTION",
"source": "REAP_CARD",
"owner": {
"type": "REAP_USER",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"code": "AGENTIC_REQUEST_REJECTED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_PAYMENTS_NOT_ENABLED",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_RESOURCE_NOT_FOUND",
"message": "<string>",
"detail": {}
}
}{
"error": {
"code": "AGENTIC_SERVICE_UNAVAILABLE",
"message": "<string>",
"detail": {}
}
}Authorizations
API key as Bearer token
Headers
API version (YYYY-MM-DD)
2025-02-14 "2025-02-14"
Unique key for safely retrying this request. Up to 255 characters; we recommend a UUIDv4. The first request executes and its response is cached; subsequent requests with the same key replay the cached response (24h retention).
1 - 255Body
How the card is enrolled. The request shape depends on source.
Response
Created enrollment. The response shape depends on source.
- ReapCard
- BinSponsor
- External
Enrollment created from an existing card
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$REQUIRES_ACTION, ACTIVE, FAILED, EXPIRED, REVOKED "REQUIRES_ACTION"
"REAP_CARD"Cardholder that owns this enrollment
Show child attributes
Show child attributes