Refunds
Import Refund
This endpoint can be used to create or update (if externalId already exists) a refund.
It cannot be used when using a native integration as refunds are only created by the native integration in that case.
post/refunds
Request
- Base URLhttps://api.upflow.io/v1
- AuthAPI key in header X-Api-Key and API key in header X-Api-Secret
Request body
Example request
{
"refNumber": "REFUND123",
"currency": "EUR",
"amount": 1700,
"validatedAt": "2015-05-05T12:30:00Z",
"externalId": "92842AB37",
"linkedPayments": [
{
"amountLinked": 3000,
"payment": {
"id": "00a70b35-2be3-4c43-aefb-397190134655",
"externalId": "AEGaaZD"
}
}
],
"linkedCreditNotes": [
{
"amountLinked": 3000,
"creditNote": {
"id": "00a70b35-2be3-4c43-aefb-397190134655",
"externalId": "AEGaaZD",
"customId": "AEGaaZD"
}
}
],
"customer": {
"id": "00a70b35-2be3-4c43-aefb-397190134655",
"externalId": "1a2c3b"
}
}Response
Refund Created or Updated (Note: Apiary doc says 200, usually POST for create returns 201. Sticking to doc.)
Example response
{
"refNumber": "REFUND123",
"currency": "EUR",
"amount": 1700,
"validatedAt": "2015-05-05T12:30:00Z",
"externalId": "92842AB37",
"id": "00a70b35-2be3-4c43-aefb-397190134655",
"amountLinked": 1700,
"modifiedAt": "2015-05-05T12:30:00Z",
"linkedTransactions": [
{
"linkedAmount": 3000,
"payment": {
"refNumber": "PYMT123",
"currency": "EUR",
"amount": 1700,
"validatedAt": "2015-05-05T12:30:00Z",
"externalId": "92842AB37",
"customFields": [
{
"id": "00a70b35-2be3-4c43-aefb-397190134655",
"externalId": "AEGaaZD"
}
]
}
}
],
"linkedPayments": [
{
"linkedAmount": 3000,
"payment": {
"refNumber": "PYMT123",
"currency": "EUR",
"amount": 1700,
"validatedAt": "2015-05-05T12:30:00Z",
"externalId": "92842AB37",
"customFields": [
{
"id": "00a70b35-2be3-4c43-aefb-397190134655",
"externalId": "AEGaaZD"
}
]
}
}
],
"linkedCreditNotes": [
{
"linkedAmount": 3000,
"creditNote": {
"customId": "CN123",
"externalId": "92842AB37",
"issuedAt": "2015-05-05T12:30:00Z",
"dueDate": "2015-05-05T12:30:00Z",
"name": "Credit Note for returned goods",
"currency": "EUR",
"grossAmount": 1700,
"netAmount": 1500,
"updatedAt": "2015-05-05T12:30:00Z"
}
}
],
"customer": {
"id": "00a70b35-2be3-4c43-aefb-397190134655",
"externalId": "1a2c3b",
"companyName": "Upflow SAS",
"accountingRef": "UPFL-SAS"
},
"createdAt": "2015-05-05T12:30:00Z",
"updatedAt": "2015-05-05T12:30:00Z"
}Changes
No recorded changes to this operation across all 1 revision of this API.