Create Credit Memo
POST/creditMemos
Creates a credit memo linked to an existing payer customer.
Required body fields: extId, extKey, amount, amountRemaining, extCustomerId, extCreationDate, extPostedDate, and status (active or cancelled).
Customer must exist first: extCustomerId must match a payer customer already created via Create Customer.
Dates: extCreationDate and extPostedDate accept MM-DD-YYYY, MM/DD/YYYY, or MM.DD.YYYY (ISO YYYY-MM-DD is rejected).
Amounts: Send JSON numbers (for example 25.0 or 25) — string amounts such as "25.00" return 422 validation errors.
This endpoint is strict-create, not upsert. It never updates an existing record. If extId already exists for your merchant, the request is rejected with 400 Bad Request:
{
"error": {
"name": "badRequest",
"status": "400",
"type": "apiError",
"description": "General API error.",
"details": {
"code": "apiError",
"description": "The request failed due to an API error",
"explanation": "CreditMemo with extId: <yourExtId> already exists"
},
"ref": "<request-tracing-id>"
}
}
extId uniqueness is scoped per merchant. If your integration retries a create after a timeout, check for this 400/apiError response before assuming the request failed — it means the record already exists, not that the retry failed.
extCustomerId must match an existing payer customer. If it doesn't, the request is rejected with 404 Not Found:
{
"error": {
"name": "notFound",
"status": "404",
"type": "requestError",
"description": "There was a problem with the request.",
"details": {
"code": "resourceNotFound",
"description": "The resource was not found.",
"explanation": "Customer not found for extCustomerId: <value>. Please create the customer first."
},
"ref": "<request-tracing-id>"
}
}
Create the payer customer first via Create Customer, then retry.
Currency must be on your merchant's allowed-currency list. Each merchant is provisioned with a set of allowed currencies. Submitting a currency outside that list is rejected with 422 Unprocessable Entity, e.g. "Currency 'CAD' is not allowed. Allowed currencies: USD".
Request
Responses
- 201
- 400
- 404
- 422
Created
Bad request — including a duplicate extId for this merchant (see description above)
Payer customer not found for extCustomerId (see description above)
Validation error — including string amounts and disallowed currency (see description above)