Create your first payment


To make your first payment, just use the following api:

Create Payment

.POST https://neopay.io/api/payments

Headers

{
    "Authorization": "<my-app-token>",
    "x-app-key": "<my-app-key>",
    "Content-Type": "application/json/",
    "Accept": "application/json"
}

{info.fa-hint} <my-app-token> is the token generate for your Application {info.fa-hint} <my-app-key> is obtained in your Application portal as the Application ID

Request Body example

{
    "institutionId": 20,
    "payment": {
        "amount": 122.44,
        "currency": "GBP"
    },
    "customer": {
        "id": "99618204-6daf-4eca-8180-c21bb8d8ee24",
        "name": "Jhon Doe",
        "email": "jhondoe@email.com",
        "country": "GB"
    },
    "reference": "reference",
    "callback_url": "https://webhook.site/2d9eefba-3ac8-4692-a0ec-d57dd3ce3abd"
}
Field Type Description
institutionId Integer The ID of the institution. (Required)
payment Object The payment details. (Required)
payment.amount Number Amount of payment (Required)
payment.currency String The currency of the payment. (Required)
customer Object The customer details (Required)
customer.id UUID The customer UUID (Required if you don't send the customer.email )
customer.email String The customer email (Required if you don't send the customer.id )
customer.name String The customer name (Optional )
customer.country String The customer country (Required )
customer.resource Resource Complete customer resource
reference String Payment reference (Optional )
callback_url String Payment callback url (OPtional )

Response example

Success Response:


HTTP 200
{
    "message": "Payment saved successfully!",
    "payment": {
        "id": "9968c3db-b398-46ab-962e-08c1d52e8061",
        "application_id": "995d8ae8-b47f-4b3d-b411-e325d95f6ffd",
        "amount": 122.44,
        "status": "pending",
        "currency": "GBP",
        "country": "GB",
        "service": "api",
        "environment": "sandbox",
        "institution": {
            "id": 20,
            "name": "Modelo Sandbox"
        },
        "customer": {
            "id": "9968c3db-9d70-4751-b2e0-6d74ce8b1be6",
            "name": "Jhon doe",
            "email": "jhondoe@email.com",
            "currency": "GBP",
            "country": "GB"
        },
        "payee": {
            "name": "jOHN",
            "country_code": "GB",
            "bank_name": "MODELO",
            "accountable": "DE89370400440532013000",
            "swift_bic": "AACSDE33"
        },
        "created_at": "2023-06-14T14:20:16.000000Z",
        "updated_at": "2023-06-14T14:20:16.000000Z",
        "authorisationUrl": "Url of payment authorized"
    }
}