curl --request POST \
--url https://api.metronome.com/v1/payments/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_gateway": {
"type": "stripe",
"stripe": {
"payment_intent_id": "<string>",
"payment_method_id": "<string>",
"error": {
"type": "<string>",
"code": "<string>",
"decline_code": "<string>"
}
}
},
"fiat_credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"amount": 123,
"amount_paid": 123,
"status": "pending",
"error_message": "<string>",
"updated_at": "2022-02-01T00:00:00Z",
"created_at": "2022-02-01T00:00:00Z"
}
}Cancel an existing payment attempt for an invoice.
curl --request POST \
--url https://api.metronome.com/v1/payments/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"contract_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payment_gateway": {
"type": "stripe",
"stripe": {
"payment_intent_id": "<string>",
"payment_method_id": "<string>",
"error": {
"type": "<string>",
"code": "<string>",
"decline_code": "<string>"
}
}
},
"fiat_credit_type": {
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"amount": 123,
"amount_paid": 123,
"status": "pending",
"error_message": "<string>",
"updated_at": "2022-02-01T00:00:00Z",
"created_at": "2022-02-01T00:00:00Z"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Success
Show child attributes
Show child attributes
stripe Show child attributes
pending, requires_intervention, paid, canceled "2022-02-01T00:00:00Z"
"2022-02-01T00:00:00Z"