Attach a receipt to a card account activity
curl --request POST \
--url https://api.global.direct.reap.global/2026-07-13/cards/activities/{activityId}/receipts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.global.direct.reap.global/2026-07-13/cards/activities/{activityId}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.global.direct.reap.global/2026-07-13/cards/activities/{activityId}/receipts"
payload = { "fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "0a0a0a0a-0000-4000-8000-000000000001",
"activityId": "txn_00000000-0000-0000-0000-00000000f001",
"fileName": "invoice-INV-20431.pdf",
"contentType": "application/pdf",
"createdAt": "2026-10-29T01:02:03.000Z"
}Card account
Attach a receipt to a card account activity
Required API-key scope: card_activities:write.
Attaches an uploaded file to a card transaction as a receipt.
Before you attach
- Upload the file with Upload a file and wait until its
statusisready. - Attach it within 24 hours of the upload.
Limits
- A card transaction holds up to 3 receipts.
- Each file can be attached once, even after you delete its receipt. To attach it again, upload it again.
Retries
Send an Idempotency-Key header. If you get a 502 or ATTACH_IN_PROGRESS, send the same request again every minute, for up to 10 minutes. It never creates a second receipt.
| Error | When |
|---|---|
FILE_NOT_READY | The file is still being scanned. |
FILE_BLOCKED | The scan blocked the file or failed. Upload a different file. |
FILE_NOT_FOUND | The file doesn’t exist, has expired or belongs to another business. |
FILE_ALREADY_ATTACHED | The file is already attached. details.receiptId has the receipt. |
RECEIPT_LIMIT_REACHED | The transaction already has 3 receipts. |
ACTIVITY_NO_CHARGE | The activity isn’t a card transaction. |
ACTIVITY_CARD_TERMINATED | The card is terminated. |
FEATURE_NOT_ENABLED | Receipts aren’t enabled for your business. |
404 | The activity doesn’t exist or is voided. |
POST
/
2026-07-13
/
cards
/
activities
/
{activityId}
/
receipts
Attach a receipt to a card account activity
curl --request POST \
--url https://api.global.direct.reap.global/2026-07-13/cards/activities/{activityId}/receipts \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({fileId: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.global.direct.reap.global/2026-07-13/cards/activities/{activityId}/receipts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.global.direct.reap.global/2026-07-13/cards/activities/{activityId}/receipts"
payload = { "fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "0a0a0a0a-0000-4000-8000-000000000001",
"activityId": "txn_00000000-0000-0000-0000-00000000f001",
"fileName": "invoice-INV-20431.pdf",
"contentType": "application/pdf",
"createdAt": "2026-10-29T01:02:03.000Z"
}Headers
Path Parameters
The activity's id, as returned by List card account activities.
Required string length:
1 - 255Body
application/json
The id of a file you uploaded with Upload a file. Its status must be ready.
Pattern:
^([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)$Response
When the receipt was added to the card transaction, in UTC.
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$